package com.weilx959.spt.app.model;

import com.alibaba.fastjson2.annotation.JSONField;
import com.weilx959.spt.core.constants.LanguageEnum;
import com.weilx959.spt.core.constants.ThemeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * 应用程序配置
 *
 * @author weilx
 * @since 2024-07-18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AppConfig implements Serializable {
    @Serial
    private static final long serialVersionUID = 4771876620263534499L;

    @JSONField(name = "General")
    private General general;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class General implements Serializable {
        @Serial
        private static final long serialVersionUID = -3622199567818561131L;

        @Builder.Default
        private ThemeEnum theme = ThemeEnum.LIGHT;

        @Builder.Default
        private LanguageEnum language = LanguageEnum.SIMPLIFIED_CHINESE;
    }
}
